#include "netreadcompleteevent.h"
#include <string.h>

NetReadCompleteEvent::NetReadCompleteEvent() :
    Event(ET_NET_READCOMPLETE),
    m_current(0),
    m_netKey(0)
{
    memset(m_memory, 0, NET_BUFFER_SIZE);
}

NetReadCompleteEvent::~NetReadCompleteEvent()
{

}

unsigned char *NetReadCompleteEvent::memory()
{
    return m_memory;
}

unsigned long NetReadCompleteEvent::netKey()
{
    return m_netKey;
}

size_t NetReadCompleteEvent::length()
{
    return NET_BUFFER_SIZE;
}

size_t NetReadCompleteEvent::dataLength()
{
    return m_current;
}

void NetReadCompleteEvent::setDataLength(size_t size)
{
    m_current = size;
}

void NetReadCompleteEvent::setNetKey(unsigned long netKey)
{
    m_netKey = netKey;
}
